// 用户相关接口
import { post, get } from '@/http/index'
import type {
  loginFormData,
} from './type'
enum API {
  LOGIN_URL = '/admin/acl/index/login',
  USERINFO_URL = '/admin/acl/index/info',
  LOGOUT_URL = '/admin/acl/index/logout',
}

// 登录
// export const login = (data: loginFormData) => post('/user/login', data)
export const login = (data: loginFormData) => post(API.LOGIN_URL, data)

// 获取用户信息
export const getUserInfo = () => get(API.USERINFO_URL)
// export const getUserInfo = () => get('/user/info')

// 退出登录
export const logout = () => post(API.LOGOUT_URL)